home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / utility / wxlslib.zip / xlslib / nongraph.lsp < prev    next >
Lisp/Scheme  |  1992-02-20  |  2KB  |  63 lines

  1. ;;;;
  2. ;;;;
  3. ;;;; Basic 2D Plotting Functions
  4. ;;;;
  5. ;;;;
  6.  
  7. (defun plot-function (f xmin xmax &key (num-points 50) (type 'solid) labels)
  8. "Args: (f xmin xmax &optional (num-points 50) labels)
  9. Plots function F of one real variable over the range between xmin and xmax.
  10. The function is evaluated at NUM-POINTS points. LABELS is a list of axis
  11. labels."
  12.   (let* ((x (rseq xmin xmax num-points))
  13.          (y (mapcar f x)))
  14.     (plot-lines x y :type type :variable-labels labels)))
  15.  
  16. ;;;;
  17. ;;;;
  18. ;;;; Quantile and Probability Plot Functions
  19. ;;;;
  20. ;;;;
  21.  
  22. (defun quantile-plot (x &key (quantile-function #'normal-quant) 
  23.                         (title "Quantile Plot") point-labels)
  24. "Args: (data &key (quantile-function #'normal-quant) (title \"Quantile Plot\") point-labels)"
  25.   (plot-points (funcall quantile-function (/ (1+ (rank x)) (1+ (length x))))
  26.                x))
  27.  
  28. (defun probability-plot (x &key (distribution-function #'normal-cdf)
  29.                            (title "Probability Plot") point-labels)
  30. "Args: (data &key (distribution-function #'normal-cdf) (title \"Probability Plot\") point-labels)"
  31.   (plot-points (/ (1+ (rank x)) (1+ (length x)))
  32.            (funcall distribution-function x)))
  33.  
  34. ;;;;
  35. ;;;; Disable everythinmg else
  36. ;;;;
  37. (defmacro defnongraph (sym)
  38.   `(defun ,sym (&rest args)
  39.      (error "~a is not available without windows" ',sym)))
  40.  
  41. (defnongraph ok-or-cancel-dialog)
  42. (defnongraph message-dialog)
  43. (defnongraph get-string-dialog)
  44. (defnongraph get-value-dialog)
  45. (defnongraph choose-item-dialog)
  46. (defnongraph choose-subset-dialog)
  47. (defnongraph sequence-slider-dialog)
  48. (defnongraph interval-slider-dialog)
  49. (defnongraph close-all-plots)
  50. (defnongraph get-new-integer)
  51. (defnongraph linked-plots)
  52. (defnongraph active-graph-windows)
  53. (defnongraph color-symbols)
  54. (defnongraph cursor-symbols)
  55. (defnongraph plot-symbol-symbols)
  56. (defnongraph pause)
  57. (defnongraph link-views)
  58. (defnongraph unlink-views)
  59. (defnongraph spin-function)
  60. (defnongraph boxplot)
  61. (defnongraph boxplot-x)
  62. (defnongraph contour-function)
  63.